package com.yanqu.road.entity.banquet.cross;

import com.alibaba.fastjson.JSON;
import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.player.UserBaseInfo;

/**
 * 参加宴会者
 */
public class CrossBanquetMember extends DataObject {

    /**
     * 唯一标示
     */
    private String banquetId;

    private long userId;

    private int giftId;

    private long popularity;

    private long integral;

    private int pos;

    private UserBaseInfo userBaseInfo = new UserBaseInfo();            //玩家基础信息

    private boolean robot;

    private int robotProcessId;

    private int robotId;

    private long joinTime;              //赴宴时间

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public String getBanquetId() {
        return banquetId;
    }

    public void setBanquetId(String banquetId) {
        if(!banquetId.equals(this.banquetId)){
            this.banquetId = banquetId;
            this.setUpdateOption();
        }
    }

    public int getGiftId() {
        return giftId;
    }

    public void setGiftId(int giftId) {
        if(giftId != this.giftId){
            this.giftId = giftId;
            this.setUpdateOption();
        }
    }

    public long getPopularity() {
        return popularity;
    }

    public void setPopularity(long popularity) {
        if(popularity != this.popularity){
            this.popularity = popularity;
            this.setUpdateOption();
        }
    }

    public long getIntegral() {
        return integral;
    }

    public void setIntegral(long integral) {
        if(integral != this.integral){
            this.integral = integral;
            this.setUpdateOption();
        }
    }

    public int getPos() {
        return pos;
    }

    public void setPos(int pos) {
        if(pos != this.pos){
            this.pos = pos;
            this.setUpdateOption();
        }
    }

    public UserBaseInfo getUserBaseInfo() {
        return userBaseInfo;
    }

    public String getUserBaseInfoJsonStr(){
        if(null == userBaseInfo){
            return "{}";
        }else {
            return JSON.toJSONString(userBaseInfo);
        }
    }

    public void setUserBaseInfo(UserBaseInfo userBaseInfo) {
        this.userBaseInfo = userBaseInfo;
    }


    public boolean isRobot() {
        return robot;
    }

    public void setRobot(boolean robot) {
        if(robot != this.robot){
            this.robot = robot;
            setUpdateOption();
        }
    }

    public int getRobotProcessId() {
        return robotProcessId;
    }

    public void setRobotProcessId(int robotProcessId) {
        if(robotProcessId != this.robotProcessId){
            this.robotProcessId = robotProcessId;
            this.setUpdateOption();
        }
    }

    public int getRobotId() {
        return robotId;
    }

    public void setRobotId(int robotId) {
        if(robotId != this.robotId){
            this.robotId = robotId;
            this.setUpdateOption();
        }
    }

    public long getJoinTime() {
        return joinTime;
    }

    public void setJoinTime(long joinTime) {
        if (this.joinTime != joinTime) {
            this.joinTime = joinTime;
            setUpdateOption();
        }
    }
}
